package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GaCarouselMapper;
import com.ruoyi.system.domain.GaCarousel;
import com.ruoyi.system.service.IGaCarouselService;

/**
 * 轮播图Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-18
 */
@Service
public class GaCarouselServiceImpl implements IGaCarouselService 
{
    @Autowired
    private GaCarouselMapper gaCarouselMapper;

    /**
     * 查询轮播图
     * 
     * @param id 轮播图主键
     * @return 轮播图
     */
    @Override
    public GaCarousel selectGaCarouselById(Long id)
    {
        return gaCarouselMapper.selectGaCarouselById(id);
    }

    /**
     * 查询轮播图列表
     * 
     * @param gaCarousel 轮播图
     * @return 轮播图
     */
    @Override
    public List<GaCarousel> selectGaCarouselList(GaCarousel gaCarousel)
    {
        return gaCarouselMapper.selectGaCarouselList(gaCarousel);
    }

    /**
     * 新增轮播图
     * 
     * @param gaCarousel 轮播图
     * @return 结果
     */
    @Override
    public int insertGaCarousel(GaCarousel gaCarousel)
    {
        return gaCarouselMapper.insertGaCarousel(gaCarousel);
    }

    /**
     * 修改轮播图
     * 
     * @param gaCarousel 轮播图
     * @return 结果
     */
    @Override
    public int updateGaCarousel(GaCarousel gaCarousel)
    {
        return gaCarouselMapper.updateGaCarousel(gaCarousel);
    }

    /**
     * 批量删除轮播图
     * 
     * @param ids 需要删除的轮播图主键
     * @return 结果
     */
    @Override
    public int deleteGaCarouselByIds(Long[] ids)
    {
        return gaCarouselMapper.deleteGaCarouselByIds(ids);
    }

    /**
     * 删除轮播图信息
     * 
     * @param id 轮播图主键
     * @return 结果
     */
    @Override
    public int deleteGaCarouselById(Long id)
    {
        return gaCarouselMapper.deleteGaCarouselById(id);
    }
}
